@import "variables";

#modal_overlay {
  background: rgba(0, 0, 0, 0.7);
  bottom: 0;
  left: -10000px;
  opacity: 0;
  overflow-y: auto;
  position: fixed;
  right: 10000px;
  top: 0;
  transition: opacity 0.125s ease-in;
  z-index: 900;
}

.modal {
  align-items: center;
  background-color: #ffffff;
  border-radius: $border-radius * 2.5;
  display: block;
  margin: 5em auto;
  max-width: $content-width * 0.9;
  min-height: 32px;
  min-width: $content-width / 5;
  padding: 1.2em 1em 1.2em 1em;
  width: 90vw;
  box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.5);

  pre,
  textarea {
    overflow: auto;
    white-space: pre-wrap;
  }

  & > pre,
  & > textarea {
    margin-bottom: 1em;
  }

  & > * {
    display: block;
    width: 100%;
    line-height: normal;

    &.table {
      display: table;
    }
  }

  & > h4 {
    margin-top: 0;
  }
}

body.modal-overlay-active {
  height: 100vh;
  overflow: hidden;

  #modal_overlay {
    left: 0;
    opacity: 1;
    right: 0;
  }
}
